<?php
namespace Home\Controller;
use Think\Controller;
class MessageController extends Controller {

   //  全局变量的使用与java不同= =
	public function message() {
		$message = M('message');
        $mesInfo = $message->select();
		$this->assign('list', $mesInfo);
		$this->display('message');
	}
	public function editMes() {
		$id = I('get.id', 0);
		$message = D('message');
		$mesInfo = $message->find($id);
		$this->assign('id', $id);
        $this->assign('list', $mesInfo);
		$this->display();
	}
	public function delMes() {
		$message = M('message');
		$mesInfo = $message->select();
		$this->assign('list', $mesInfo);
        $this->display('message/message');
	}
}